<!DOCTYPE html>
<html>

<head lang="en">
    <meta charset="utf-8">
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>

<body>
    <div id="app">
        <div id="example-1">
            <button v-on:click="counter+=1">数值：{{counter}}</button>
            <button v-on:click="greet('abc',$event)">Greet</button>
        </div>
    </div>
    <script type="text/javascript">
        var vm = new Vue({
            el: "#app",
            data: {
                counter: 0,
                name:"vue"
            },
            methods:{
                greet:function(str,e){
                    alert(str);
                    console.log(e);
                }
            }
        });
    </script>
    <style type="text/css">

    </style>
</body>

</html>